package com.zhangzhan.gulimallware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhangzhan.gulimallcommcon.tos.SkuCheckInventoryTo;
import com.zhangzhan.gulimallcommcon.util.PageUtils;
import com.zhangzhan.gulimallware.entity.WareSkuEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author zhangzhan
 * @email sunlightcs@gmail.com
 * @date 2024-06-18 23:32:09
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPageDetail(Map<String, Object> params);

    List<SkuCheckInventoryTo> checkInventory( List<Long> skuIds);

    Boolean lockInventory(Map<Long, Integer> map, String orderSn);
    Boolean unLock(Long skuId,Long wareId,Integer count);
}

